using System.Globalization;

namespace CodingDojo.Domain.KataFizzBuzz
{
  public class FizzBuzz
  {
    public string GetNumber(int number)
    {
      if (IsDivisibleByThree(number) && IsDivisibleByFive(number))
        return "FizzBuzz";
      if (IsDivisibleByThree(number))
        return "Fizz";
      if (IsDivisibleByFive(number))
        return "Buzz";
      return number.ToString(CultureInfo.InvariantCulture);
    }

    private static bool IsDivisibleByThree(int number)
    {
      return (number % 3) == 0;
    }

    private static bool IsDivisibleByFive(int number)
    {
      return (number % 5) == 0;
    }
  }
}
